﻿using System.Collections.Generic;
using MadMediaManager.Core.Domain.Components;

namespace MadMediaManager.Core.Domain
{
    public class MovieIso : Iso
    {
        protected MovieIso()
        {
        }

        public static MovieIso NewIso(string filePath, string name, long fileSize)
        {
            var movie = new MovieIso
                            {
                                EntityId = filePath,
                                FileSize = new DigitalInformationUnitValue(DigitalInformationUnit.Byte, fileSize),
                                IsFileFound = true,
                                Name = name,
                                _genres = new List<string>()
                            };
            return movie;
        }

        protected IList<string> _genres;
        public virtual IEnumerable<string> Genres { get { return _genres; } }
        public virtual void AddGenre(string genre)
        {
            _genres.Add(genre);
        }
        public virtual void RemoveGenre(string genre)
        {
            _genres.Remove(genre);
        }

        public override IsoType IsoType { get; set; }
    }
}
